<script>
export default {
  name: "anLier",
  data(){
    return{
      col:'red',
      value:''
    }
  },
  directives:{
    color1(el,binding){
      console.log(el)
      console.log(binding)
      el.focus()
    },
    color2:{
      inserted(){

      }
    }
  }
}
</script>

<template>
<div>
  directive
  <div v-color="'green'">1</div>
  <div v-color="col">2</div>

  <input type="text" v-color>

  <input type="text" v-color v-model="value">

  <div v-color1>3</div>
  <input type="text" v-color1>
</div>
</template>

<style scoped lang="less">

</style>